#include <stdio.h>
#define N 16
int main()
{
    int n ;
    int a[N];
    int i;
    printf("Input a\n");
    scanf("%x",&n);
    for (i = 0; i != N; ++i)
    {
        a[N - 1 - i] = n % 2;
        n /= 2;
    }
    for (i = 0; i != N; ++i)
    {
        printf("%d",a[i]);
        if((i+1)%4 == 0)
            printf(" ");
    }
    printf("\n");
    return 0;
}
